package ua.luxoft.main;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;

import ua.luxoft.file.FindFile;
import ua.luxoft.fileinfo.FileInfo;
import ua.luxoft.parse.ParseFile;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String path = "/home/user/Documents/MyProjects/example";
		FindFile find = new FindFile();
		ArrayList<File> arr = new ArrayList<File>();
		FileInfo info = new FileInfo();
		arr = find.getAllFilesInDir(path);
		for(File file : arr ){
			System.out.println(file.getName());
		}
		ParseFile parse = new ParseFile();
		HashMap<String, FileInfo> map = parse.workWithFile(arr);
		Set<String> keySet = map.keySet();
		for(String key : keySet){
			info = map.get(key);
			System.out.println(info.getHead());
		}
	}

}
